/*
 * Copyright (c) 2009. Silenus Consultoria, S.L.
 */
package es.silenus.detecta.service.impl;

import es.silenus.detecta.model.Organization;

import org.springframework.ldap.core.DirContextOperations;

import java.io.Serializable;


/**
 * LDAP organization mapper.
 *
 * @author <a href="mailto:malonso@silenus-consultoria.es">Mariano Alonso</a>
 * @since 26-jun-2009 14:16:14
 */
public interface LDAPOrganizationMapper extends Serializable {
	/**
	 * Maps a context into an organizational group.
	 *
	 * @param ctx the context.
	 * @param groupName the group name.
	 *
	 * @return the organizational group.
	 */
	public Organization mapGroupFromContext(DirContextOperations ctx, String groupName);

	/**
	 * Maps an organizational group into a context.
	 *
	 * @param organization the organizational group.
	 * @param ctx the context.
	 */
	public void mapGroupToContext(Organization organization, DirContextOperations ctx);
}
